<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>learn selenium</title>
    <script type="text/javascript">
        function disp_confirm(){
            var r = confirm("是否确定此消息？")
            if(r){
                document.write("已确定")
            }else{
                document.write("已取消")
            }
        }
    </script>
</head>
<body>
    <input type="button" onclick="disp_confirm()" value="点击显示confirm弹窗" name="confirm"/>
</body>
</html>